<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <!-- <div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">-->
    <!--    </div>-->
    <!--</div>-->
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_name" data-rule="required" class="form-control" name="row[shop_name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺logo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[logo]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" data-rule="required" class="form-control" name="row[description]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('购买次数')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-buy_num" data-rule="required" class="form-control" name="row[buy_num]" type="number" value="0" placeholder="0代表不限制购买次数 1代表一个用户只能买一次">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount" class="form-control" name="row[discount]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cate_id" data-rule="required" data-source="cate/index" class="form-control selectpage" name="row[cate_id]" type="text" value="" data-field="title">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-shop_images" data-rule="required" class="form-control" size="50" name="row[shop_images]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-shop_images" class="btn btn-danger faupload" data-input-id="c-shop_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-shop_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-shop_images" class="btn btn-primary fachoose" data-input-id="c-shop_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-shop_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-shop_images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('开始营业时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-business_times" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[business_times]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('结束营业时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-endtime" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[endtime]" type="text" value="">
        </div>
    </div>
    
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('Business_times')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input id="c-business_times" data-rule="required" class="form-control" name="row[business_times]" type="text">-->
    <!--    </div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Label_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-label_ids" data-rule="required" data-source="label/index" data-multiple="true" class="form-control selectpage" name="row[label_ids]" type="text" value="">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="row">
                <div class="col-xs-12">
                    <div class="input-group input-groupp-md" style="margin-bottom:10px;">
                        <input type="text" name="row[shop_address]" id="c-signin_address" value="" placeholder="如果选择定位不准确，可手动输入地址" class="form-control"/>
                        <a href="javascript:" class="btn-search-icon input-group-addon" data-toggle='addresspicker' data-input-id="c-signin_address" data-lng-id="c-signin_name-lng" data-lat-id="c-signin_name-lat" data-addon="{:get_addon_info('address')?1:0}">选择定位</a>
                    </div>
                </div>
                <div class="col-xs-6"><input type="number" name="row[lat]" id="c-signin_name-lat" value="" placeholder="纬度" class="form-control" readonly/></div>
                <div class="col-xs-6"><input type="number" name="row[lng]" id="c-signin_name-lng" value="" placeholder="经度" class="form-control" readonly/></div>
            </div>
        </div>
    </div>
    
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('Shop_address')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input id="c-shop_address" data-rule="required" class="form-control" name="row[shop_address]" type="text">-->
    <!--    </div>-->
    <!--</div>-->
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input id="c-lng" data-rule="required" class="form-control" name="row[lng]" type="text">-->
    <!--    </div>-->
    <!--</div>-->
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input id="c-lat" data-rule="required" class="form-control" name="row[lat]" type="text">-->
    <!--    </div>-->
    <!--</div>-->
   
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" data-rule="required" class="form-control" name="row[phone]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
